import {ResourceKey} from "./ResourceConstant";
import {GuiId, UISkillObj} from "../controller/model/ControllerOpt";
import {
    AchievementType,
    AdminItemType,
    AppearanceType, AttributeEnum,
    AttrStrMap,
    HandBookType,
    IntegralMallType,
    PositionType,
    TalentType,
    UnitShopType
} from "../frame/dataSource/DataModel";
import { UnitPosition } from "../type/Type";

export enum UIConfigKey {
    modeConfigs,
    buttonScale,
    backSoundInterval,
    damageBarUsePet,
    eventInterval,
    closeIconSize,
    taskButtonY,
    damageButtonY,
    transBaseX,
    transBaseY,

    guiIdCloseArr,
    TextGuiMaps,
    TextGuiInterval,
    petAttrStrMapArr,
    AttrStrNormalMapArr,
    AttrStrAttackMapArr,
    AttrStrLiveMapArr,
    AttrStrSpecialMapArr,
    BuffAttrStrAttackMapArr,
    BuffAttrStrSpeedMapArr,
    BuffAttrStrLiveMapArr,

    smallAttrStrMapArr,

    uiSkillMap,
    fontSize,
    EquipAdapt,
    achGuiItemMaps,
    talentGuiItemMaps,
    hideAchGuiItemMaps,
    appGuiItemMaps,
    shopItemMaps,
    integralMallGuiItemMaps,
    handBookGuiItemMaps,
    adminGuiItemMaps,
    maxChatItemNum,

    smallMapSize,
    smallMapPos,
    mapButtonShow,
    mapButtonX,
    mapButtonMargin,
    sysPos,
    talkPos,
}


export interface ModeConfig {
    name: string;
    image: ResourceKey;
    pos: { x: number, y: number };
    size: { w: number, h: number };
}

export interface PositionConfig {
    position: PositionType;
    image: ResourceKey;
    unitPosition: UnitPosition | undefined;
    name: string;
}

export interface SelectItemMap {
    type: number,
    unSelect: ResourceKey,
    select: ResourceKey,
    unSelectMargin: { l: number, t: number, r: number, b: number },
    unSelectSize: { w: number, h: number },

    board: ResourceKey,
    // boardMargin: { l: number, t: number, r: number, b: number },
    boardSize: { w: number, h: number },

    contentPadding: { l: number, t: number, r: number, b: number },
    contentSize: { w: number, h: number },

    pageFootBack: ResourceKey,
    pageFootMargin: { l: number, t: number, r: number, b: number },
    pageFootSize: { w: number, h: number },

    closeBack: ResourceKey,
    closeMargin: { l: number, t: number, r: number, b: number },
    closeSize: { w: number, h: number },

    direction: number,
}

export enum TextGuiKey {
    generate = 'generate',
}

export interface TextGuiMap {
    key: ResourceKey,
    size: { w: number, h: number },
    pos: { x: number, y: number },
}

// 配置文件（主要用来与表中所填值对接）
export class UIConfig {

    static [UIConfigKey.buttonScale]: number = 0.001;

    static [UIConfigKey.backSoundInterval]: number = 30;

    static [UIConfigKey.damageBarUsePet]: number = 1;

    static [UIConfigKey.eventInterval]: number = 0.3;

    static [UIConfigKey.closeIconSize]  = { w: 0.0325, h: 0.04316 };

    static [UIConfigKey.taskButtonY]  = 0.29050;
    static [UIConfigKey.damageButtonY]  = 0.33200;

    static [UIConfigKey.transBaseX]  = 1.25;
    static [UIConfigKey.transBaseY]  = 1.666;

    static [UIConfigKey.modeConfigs]: ModeConfig[] = [
        {
            name: '普通模式',
            image: ResourceKey.modeImage1,
            pos: { x: 0.125, y: 0.48 },
            size: { w: 0.0625, h: 0.16 },
        },
        {
            name: '生存模式',
            image: ResourceKey.modeImage2,
            pos: { x: 0.125, y: 0.68 },
            size: { w: 0.0625, h: 0.16 },
        },
    ];


    static [UIConfigKey.guiIdCloseArr] = [
        GuiId.petBar,
        GuiId.goodsBar,
        GuiId.achBar,
        GuiId.talentBar,
        GuiId.attrBar,
        GuiId.appBar,
        GuiId.handBookBar,
        GuiId.integralMallBar,
        GuiId.hideAchBar,
        GuiId.unitShopBar,
    ];

    // ui中提示ui的大小与位置
    static [UIConfigKey.TextGuiMaps]: TextGuiMap[] = [
        {
            key: ResourceKey.win,
            size: { h: 0.33200, w: 0.50000 },
            pos: { x: 0.25000, y: 0.16600 },
        },
        {
            key: ResourceKey.lose,
            size: { h: 0.33200, w: 0.50000 },
            pos: { x: 0.25000, y: 0.16600 },
        },
        {
            key: ResourceKey.arousal,
            size: { h: 0.24900, w: 0.37500 },
            pos: { x: 0.31250, y: 0.08300 },
        },
        {
            key: ResourceKey.toNight,
            size: { h: 0.24900, w: 0.37500 },
            pos: { x: 0.31250, y: 0.08300 },
        },
        {
            key: ResourceKey.toDay,
            size: { h: 0.24900, w: 0.37500 },
            pos: { x: 0.31250, y: 0.08300 },
        },
        {
            key: ResourceKey.bossBecome,
            size: { h: 0.24900, w: 0.37500 },
            pos: { x: 0.31250, y: 0.08300 },
        },
        {
            key: ResourceKey.generate,
            size: { h: 0.49800, w: 0.37500 },
            pos: { x: 0.37500, y: 0.49800 },
        },
    ]

    static [UIConfigKey.TextGuiInterval] = 3;
    static [UIConfigKey.EquipAdapt]: PositionConfig[] = [
        {
            position: PositionType.arms,
            image: ResourceKey.equipArmBlps,
            unitPosition: UnitPosition.HandRight,
            name: '武器'
        },
        {
            position: PositionType.pad,
            image: ResourceKey.equipPadBlps,
            unitPosition: UnitPosition.HandLeft,
            name: '副手'
        },
        {
            position: PositionType.clothes,
            image: ResourceKey.equipClothseBlps,
            unitPosition: UnitPosition.chest,
            name: '衣服'
        },
        {
            position: PositionType.hat,
            image: ResourceKey.equipHatBlps,
            unitPosition: UnitPosition.overhead,
            name: '帽子',
        },
        {
            position: PositionType.pants,
            image: ResourceKey.equipPantsBlps,
            unitPosition: undefined,
            name: '手套'
        },
        {
            position: PositionType.shoe,
            image: ResourceKey.equipShoesBlps,
            unitPosition: UnitPosition.origin,
            name: '鞋子'
        },
        {
            position: PositionType.belt,
            image: ResourceKey.equipBeltBlps,
            unitPosition: undefined,
            name: '饰品',
        },
        {
            position: PositionType.necklace,
            image: ResourceKey.equipNeckLaceBlps,
            unitPosition: undefined,
            name: '项链',
        },
        {
            position: PositionType.ring,
            image: ResourceKey.equipRingBlps,
            unitPosition: undefined,
            name: '戒指',
        },
    ];

    // 宠物属性面板中属性的排列顺序
    static [UIConfigKey.petAttrStrMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.attack,
            str: '攻击力:',
            usePercent: false,
        },
        {
            key: AttributeEnum.defense,
            str: '物理防御:',
            usePercent: false,
        },
        {
            key: AttributeEnum.magicResistance,
            str: '魔法防御:',
            usePercent: false,
        },
        {
            key: AttributeEnum.attackSpeed,
            str: '攻击速度:',
            usePercent: false,
        },
        {
            key: AttributeEnum.speed,
            str: '移动速度:',
            usePercent: false,
        },
    ]
    // // ui属性面板中属性的排列顺序
    // static [UIConfigKey.AttrStrAttackMapArr]: AttrStrMap[] = [
    //     {
    //         key: 'attackSpeed',
    //         str: '攻击速度',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'attackRange',
    //         str: '攻击范围',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'CH_physics_hurt',
    //         str: '物理暴伤',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'CH_physics_chance',
    //         str: '物理暴率',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'physicsAddRadix',
    //         str: '物理加成',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'physics_hit',
    //         str: '物理命中',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'CH_spell_hurt',
    //         str: '法术暴伤',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'CH_spell_chance',
    //         str: '法术暴率',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spellAddRadix',
    //         str: '法术加成',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spell_hit',
    //         str: '法术命中',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'attackDistance',
    //         str: '攻击距离',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'physics_Penetration',
    //         str: '物理穿透',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spell_Penetration',
    //         str: '法术穿透',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'attackRangeHurt',
    //         str: '溅射伤害',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'law',
    //         str: '法术强度',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'realHurt',
    //         str: '真实伤害',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'attackSpeedInterval',
    //         str: '攻击间隔',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'allAddRadix',
    //         str: '总伤害加成',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'physicsPrecise',
    //         str: '物理精准',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spellPrecise',
    //         str: '法术精准',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'regular_physics_Penetration',
    //         str: '固定物穿',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'regular_spell_Penetration',
    //         str: '固定法穿',
    //         usePercent: false,
    //     },
    // ]
    // ui属性面板中属性的排列顺序
    static [UIConfigKey.AttrStrAttackMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.attack,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.regular_physics_Penetration,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.attackSpeed,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.al_chChance,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.attackDistance,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.defense,
            str: '',
            usePercent: false,
            marginT: 0.0157
        },
        {
            key: AttributeEnum.al_chResistance,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.maxLife,
            str: '',
            usePercent: false,
            marginT: 0.0157
        },
        {
            key: AttributeEnum.lifeRecovery,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.treatAddRadix,
            str: '',
            usePercent: true,
        },
        {
            key: AttributeEnum.al_hit,
            str: '',
            usePercent: true,
            marginT: 0.0157
        },
        {
            key: AttributeEnum.al_dodge,
            str: '',
            usePercent: true,
        },
        {
            key: AttributeEnum.al_blood_sucking,
            str: '',
            usePercent: true,
        },
        {
            key: AttributeEnum.expAddRadix,
            str: '',
            usePercent: true,
            marginT: 0.0157
        },
        {
            key: AttributeEnum.coinAddRadix,
            str: '',
            usePercent: true,
        },
    ]
    // static [UIConfigKey.AttrStrLiveMapArr]: AttrStrMap[] = [
    //     {
    //         key: 'lifeRecovery',
    //         str: '生命回复',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'magicRecovery',
    //         str: '法力回复',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'defense',
    //         str: '物理防御',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'magicResistance',
    //         str: '魔法防御',
    //         usePercent: false,
    //     },
    //     {
    //         key: 'physics_damage_reduction',
    //         str: '物理减免',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'physics_Dodge',
    //         str: '物理闪避',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spell_damage_reduction',
    //         str: '法术减免',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spell_Dodge',
    //         str: '法术闪避',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'physics_Thorns',
    //         str: '物理反伤',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spell_Thorns',
    //         str: '法术反伤',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'allDamageReduction',
    //         str: '总伤害减免',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'CH_physics_Resistance',
    //         str: '物暴抵抗',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'CH_spell_Resistance',
    //         str: '法暴抵抗',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'physicsDamageBlock',
    //         str: '物理格挡',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spellDamageBlock',
    //         str: '法术格挡',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'controlResistance',
    //         str: '控制减免',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'regular_physics_damage_reduction',
    //         str: '固定物免',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'regular_spell_damage_reduction',
    //         str: '固定法免',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'physics_blood_sucking',
    //         str: '物理吸血',
    //         usePercent: true,
    //     },
    //     {
    //         key: 'spell_blood_sucking',
    //         str: '法术吸血',
    //         usePercent: true,
    //     },
    // ];
    static [UIConfigKey.AttrStrLiveMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.law,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.regular_spell_Penetration,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.coolingReduction,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.al_chHurt,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.al_hurtAddRadix,
            str: '',
            usePercent: true,
        },
        {
            key: AttributeEnum.magicResistance,
            str: '',
            usePercent: false,
            marginT: 0.0157
        },
        {
            key: AttributeEnum.al_damageReduction,
            str: '',
            usePercent: true,
        },
        {
            key: AttributeEnum.maxMagic,
            str: '',
            usePercent: false,
            marginT: 0.0157
        },
        {
            key: AttributeEnum.magicRecovery,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.al_precise,
            str: '',
            usePercent: true,
            marginT: 0.035
        },
        {
            key: AttributeEnum.al_damageBlock,
            str: '',
            usePercent: true,
        },
        {
            key: AttributeEnum.speed,
            str: '',
            usePercent: false,
        },
        {
            key: AttributeEnum.luckyValue,
            str: '',
            usePercent: false,
            marginT: 0.0157
        },
        {
            key: AttributeEnum.catchRadix,
            str: '',
            usePercent: false,
        },
    ];

    static [UIConfigKey.AttrStrNormalMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.speed,
            str: '移速',
            usePercent: false,
        },
        {
            key: AttributeEnum.luckyValue,
            str: '幸运值',
            usePercent: false,
        },
        {
            key: AttributeEnum.coinAddRadix,
            str: '金币加成',
            usePercent: true,
        },
        {
            key: AttributeEnum.woodAddRadix,
            str: '木头加成',
            usePercent: true,
        },
        {
            key: AttributeEnum.expAddRadix,
            str: '经验加成',
            usePercent: true,
        },
        {
            key: AttributeEnum.size,
            str: '体型',
            usePercent: false,
        },
        {
            key: AttributeEnum.coolingReduction,
            str: '冷却缩减',
            usePercent: true,
        },
        {
            key: AttributeEnum.catchRadix,
            str: '捕捉概率',
            usePercent: true,
        },
    ];
    static [UIConfigKey.AttrStrSpecialMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.attackInterval,
            str: '每秒攻击',
            usePercent: false,
        },
        {
            key: AttributeEnum.strInterval,
            str: '每秒力量',
            usePercent: false,
        },
        {
            key: AttributeEnum.agiInterval,
            str: '每秒敏捷',
            usePercent: false,
        },
        {
            key: AttributeEnum.intInterval,
            str: '每秒智力',
            usePercent: false,
        },
        {
            key: AttributeEnum.coinInterval,
            str: '每秒金币',
            usePercent: false,
        },
        {
            key: AttributeEnum.woodInterval,
            str: '每秒木材',
            usePercent: false,
        },
        {
            key: AttributeEnum.maxLifeInterval,
            str: '每秒生命',
            usePercent: false,
        },
        {
            key: AttributeEnum.maxMagicInterval,
            str: '每秒法力',
            usePercent: false,
        },
    ];

    static [UIConfigKey.smallAttrStrMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.attack,
            str: '攻击',
            usePercent: false,
        },
        {
            key: AttributeEnum.law,
            str: '法强',
            usePercent: false,
        },
        {
            key: AttributeEnum.attackSpeed,
            str: '攻击速度',
            usePercent: false,
        },
        {
            key: AttributeEnum.defense,
            str: '物理防御',
            usePercent: false,
        },
        {
            key: AttributeEnum.magicResistance,
            str: '魔法防御',
            usePercent: false,
        },
    ];


    static [UIConfigKey.BuffAttrStrAttackMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.attack,
            str: '攻击:',
            usePercent: false,
        },
        {
            key: AttributeEnum.law,
            str: '法强:',
            usePercent: false,
        },
    ];

    static [UIConfigKey.BuffAttrStrSpeedMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.attackSpeed,
            str: '攻击速度:',
            usePercent: false,
        },
        {
            key: AttributeEnum.speed,
            str: '移动速度:',
            usePercent: false,
        },
    ];
    static [UIConfigKey.BuffAttrStrLiveMapArr]: AttrStrMap[] = [
        {
            key: AttributeEnum.defense,
            str: '物理防御:',
            usePercent: false,
        },
        {
            key: AttributeEnum.magicResistance,
            str: '魔法防御:',
            usePercent: false,
        },
    ];


    static [UIConfigKey.uiSkillMap]: UISkillObj[] = [
        {
            guiId: GuiId.goodsBar,
            skillId: 'sk32',
        },
        {
            guiId: GuiId.petBar,
            skillId: 'sk33',
        },
        {
            guiId: GuiId.taskButton,
            skillId: 'sk35',
        },
        {
            guiId: GuiId.damageButton,
            skillId: 'sk34',
        },
    ];
    // ui 单位像素
    static [UIConfigKey.fontSize] = 0.01992;

    // ui中提示ui的大小与位置
    static [UIConfigKey.talentGuiItemMaps]: SelectItemMap[] = [
        {
            type: TalentType.default,
            unSelect: ResourceKey.talentUnSelectItem,
            select: ResourceKey.talentSelectItem,
            board: ResourceKey.talentBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0, h: 0 },

            boardSize: { w: 0.34, h: 0.59 },
            contentPadding: { l: 0.05, r: 0, t: 0.11, b: 0 },
            contentSize: { w: 0.33, h: 0.59 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.23, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0, h:0 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.28, t: 0.06, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 0,
        }
    ]


    // ui中提示ui的大小与位置
    static [UIConfigKey.achGuiItemMaps]: SelectItemMap[] = [
        {
            type: AchievementType.achievement,
            unSelect: ResourceKey.achUnSelectItem,
            select: ResourceKey.achSelectItem,
            board: ResourceKey.achBoardItem,
            unSelectMargin: { l: 0.035, r: 0, t: 0.12, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.54, h: 0.56 },
            contentPadding: { l: 0.013, r: 0, t: 0.1, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.27, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.49, t: 0.048, r: 0, b: 0 },
            closeSize: { w: 0.0325, h: 0.04316 },

            direction: 1,
        },
        {
            type: AchievementType.mapLevel,
            unSelect: ResourceKey.mapLvUnSelectItem,
            select: ResourceKey.mapLvSelectItem,
            board: ResourceKey.mapLvBoardItem,
            unSelectMargin: { l: 0.035, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.54, h: 0.56 },
            contentPadding: { l: 0.013, r: 0, t: 0.1, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.27, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.49, t: 0.048, r: 0, b: 0 },
            closeSize: { w: 0.0325, h: 0.04316 },
            direction: 1,
        },
        {
            type: AchievementType.marketItem,
            unSelect: ResourceKey.marketUnSelectItem,
            select: ResourceKey.marketSelectItem,
            board: ResourceKey.marketBoardItem,
            unSelectMargin: { l: 0.035, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.54, h: 0.56 },
            contentPadding: { l: 0.013, r: 0, t: 0.1, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.27, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.49, t: 0.048, r: 0, b: 0 },
            closeSize: { w: 0.0325, h: 0.04316 },
            direction: 0,
        },
        {
            type: AchievementType.saveItem,
            unSelect: ResourceKey.saveUnSelectItem,
            select: ResourceKey.saveSelectItem,
            board: ResourceKey.saveBoardItem,
            unSelectMargin: { l: 0.035, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.54, h: 0.56 },
            contentPadding: { l: 0.013, r: 0, t: 0.1, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.27, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.49, t: 0.048, r: 0, b: 0 },
            closeSize: { w: 0.0325, h: 0.04316 },
            direction: 0,
        },
        {
            type: AchievementType.difficult,
            unSelect: ResourceKey.diffUnSelectItem,
            select: ResourceKey.diffSelectItem,
            board: ResourceKey.diffBoardItem,
            unSelectMargin: { l: 0.035, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.54, h: 0.56 },
            contentPadding: { l: 0.013, r: 0, t: 0.1, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.27, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.49, t: 0.048, r: 0, b: 0 },
            closeSize: { w: 0.0325, h: 0.04316 },
            direction: 0,
        },
        {
            type: AchievementType.activity,
            unSelect: ResourceKey.activityUnSelectItem,
            select: ResourceKey.activitySelectItem,
            board: ResourceKey.activityBoardItem,
            unSelectMargin: { l: 0.035, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.54, h: 0.56 },
            contentPadding: { l: 0.013, r: 0, t: 0.1, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.27, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.49, t: 0.048, r: 0, b: 0 },
            closeSize: { w: 0.0325, h: 0.04316 },
            direction: 0,
        },
    ]

    static [UIConfigKey.hideAchGuiItemMaps]: SelectItemMap[] = [
        {
            type: AchievementType.forging,
            unSelect: ResourceKey.forgingUnSelectItem,
            select: ResourceKey.forgingSelectItem,
            board: ResourceKey.forgingBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: AchievementType.engineering,
            unSelect: ResourceKey.engineeringUnSelectItem,
            select: ResourceKey.engineeringSelectItem,
            board: ResourceKey.engineeringBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: AchievementType.alchemy,
            unSelect: ResourceKey.alchemyUnSelectItem,
            select: ResourceKey.alchemySelectItem,
            board: ResourceKey.alchemyBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: AchievementType.inscription,
            unSelect: ResourceKey.inscriptionUnSelectItem,
            select: ResourceKey.inscriptionSelectItem,
            board: ResourceKey.inscriptionBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: AchievementType.book,
            unSelect: ResourceKey.bookUnSelectItem,
            select: ResourceKey.bookSelectItem,
            board: ResourceKey.bookBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 1,
        },
    ]

    static [UIConfigKey.appGuiItemMaps]: SelectItemMap[] = [
        {
            type: AppearanceType.heroWing,
            unSelect: ResourceKey.heroWingUnSelectItem,
            select: ResourceKey.heroWingSelectItem,
            board: ResourceKey.heroWingBoardItem,
            unSelectMargin: { l: 0.12, r: 0, t: 0.06, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.64, h: 0.58 },
            contentPadding: { l: 0.013, r: 0, t: 0.08, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.35, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.redCloseButton,
            closeMargin: { l: 0.57, t: 0.03, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 0,
        },
        {
            type: AppearanceType.heroRing,
            unSelect: ResourceKey.heroRingUnSelectItem,
            select: ResourceKey.heroRingSelectItem,
            board: ResourceKey.heroRingBoardItem,
            unSelectMargin: { l: 0.12, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.64, h: 0.58 },
            contentPadding: { l: 0.013, r: 0, t: 0.08, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.35, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.redCloseButton,
            closeMargin: { l: 0.57, t: 0.03, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 1,
        },
        {
            type: AppearanceType.heroTitle,
            unSelect: ResourceKey.heroTitleUnSelectItem,
            select: ResourceKey.heroTitleSelectItem,
            board: ResourceKey.heroTitleBoardItem,
            unSelectMargin: { l: 0.12, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.64, h: 0.58 },
            contentPadding: { l: 0.013, r: 0, t: 0.08, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.35, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.redCloseButton,
            closeMargin: { l: 0.57, t: 0.03, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 1,
        },
        {
            type: AppearanceType.boxSkin,
            unSelect: ResourceKey.boxSkinUnSelectItem,
            select: ResourceKey.boxSkinSelectItem,
            board: ResourceKey.boxSkinBoardItem,
            unSelectMargin: { l: 0.12, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.64, h: 0.58 },
            contentPadding: { l: 0.013, r: 0, t: 0.08, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.35, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.redCloseButton,
            closeMargin: { l: 0.57, t: 0.03, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 1,
        },
        {
            type: AppearanceType.heroArm1,
            unSelect: ResourceKey.heroArm1UnSelectItem,
            select: ResourceKey.heroArm1SelectItem,
            board: ResourceKey.heroArm1BoardItem,
            unSelectMargin: { l: 0.12, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.64, h: 0.58 },
            contentPadding: { l: 0.013, r: 0, t: 0.08, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.35, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.redCloseButton,
            closeMargin: { l: 0.57, t: 0.03, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 1,
        },
        {
            type: AppearanceType.heroSkin,
            unSelect: ResourceKey.heroSkinUnSelectItem,
            select: ResourceKey.heroSkinSelectItem,
            board: ResourceKey.heroSkinBoardItem,
            unSelectMargin: { l: 0.12, r: 0, t: 0.02, b: 0 },
            unSelectSize: { w: 0.09, h: 0.04 },

            boardSize: { w: 0.64, h: 0.58 },
            contentPadding: { l: 0.013, r: 0, t: 0.08, b: 0 },
            contentSize: { w: 0.39, h: 0.38 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.35, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.redCloseButton,
            closeMargin: { l: 0.57, t: 0.03, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 1,
        },

    ]

    static [UIConfigKey.shopItemMaps]: SelectItemMap[] = [
        {
            type: UnitShopType.normal,
            unSelect: ResourceKey.normalUnSelectItem,
            select: ResourceKey.normalSelectItem,
            board: ResourceKey.unitShopBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: {  t: 0.02, l: 0.019 , r: 0, b: 0 },
            contentSize: { w: 0.243, h: 0.320},

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
    ]

    static [UIConfigKey.integralMallGuiItemMaps]: SelectItemMap[] = [
        {
            type: IntegralMallType.normal,
            unSelect: ResourceKey.normalUnSelectItem,
            select: ResourceKey.normalSelectItem,
            board: ResourceKey.normalBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0, h: 0 },

            boardSize: { w: 0.55, h: 0.56 },
            contentPadding: { l: 0.05, r: 0, t: 0.11, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.default,
            pageFootMargin: { l: 0.23, t: 0.5, r: 0, b: 0 },
            pageFootSize: { w: 0.025, h: 0.0332 },

            closeBack: ResourceKey.goldCloseButton,
            closeMargin: { l: 0.5, t: 0.07, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 0,
        },
    ]

    // ui中提示ui的大小与位置
    static [UIConfigKey.handBookGuiItemMaps]: SelectItemMap[] = [
        {
            type: HandBookType.hero,
            unSelect: ResourceKey.heroUnSelectItem,
            select: ResourceKey.heroSelectItem,
            board: ResourceKey.heroBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0, h: 0 },

            boardSize: { w: 0.7, h: 0.43 },
            contentPadding: { l: 0.093, r: 0, t: 0.03, b: 0 },
            contentSize: { w: 0.7, h: 0.43 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0.03, h: 0.43 },

            closeBack: ResourceKey.redCloseButton,
            closeMargin: { l: 0.675, t: 0.03, r: 0, b: 0 },
            closeSize: { w: 0.02, h: 0.03 },
            direction: 0,
        },
        {
            type: HandBookType.wild,
            unSelect: ResourceKey.wildUnSelectItem,
            select: ResourceKey.wildSelectItem,
            board: ResourceKey.wildBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: HandBookType.rare,
            unSelect: ResourceKey.rareUnSelectItem,
            select: ResourceKey.rareSelectItem,
            board: ResourceKey.rareBoardItem,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
    ]

    static [UIConfigKey.adminGuiItemMaps]: SelectItemMap[] = [
        {
            type: AdminItemType.ach,
            unSelect: 0,
            select: 0,
            board: 0,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: AdminItemType.item,
            unSelect: 0,
            select: 0,
            board: 0,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: AdminItemType.ability,
            unSelect: 0,
            select: 0,
            board: 0,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
        {
            type: AdminItemType.other,
            unSelect: 0,
            select: 0,
            board: 0,
            unSelectMargin: { l: 0, r: 0, t: 0, b: 0 },
            unSelectSize: { w: 0.07875, h: 0.06640 },

            boardSize: { w: 0.48125, h: 0.06640 },
            contentPadding: { l: 0.0125, r: 0, t: 0.0166, b: 0 },
            contentSize: { w: 0.48125, h: 0.49800 },

            pageFootBack: ResourceKey.pageBoard,
            pageFootMargin: { l: 0, t: 0, r: 0, b: 0 },
            pageFootSize: { w: 0, h: 0 },

            closeBack: ResourceKey.barCloseButton,
            closeMargin: { l: 0, t: 0, r: 0, b: 0 },
            closeSize: { w: 0, h: 0 },
            direction: 0,
        },
    ]

    static [UIConfigKey.maxChatItemNum] = 3;

    // 小地图大小
    static [UIConfigKey.smallMapSize] = { h: 0.14, w: 0.145 };
    // 小地图位置
    static [UIConfigKey.smallMapPos] = { x: 0.0001, y: 0.0001 };
    // 按钮大小
    static [UIConfigKey.mapButtonShow] = 0;
    // 按钮间距
    static [UIConfigKey.mapButtonX] = 0.145
    // 按钮间距
    static [UIConfigKey.mapButtonMargin] = 0.0232
    // sys位置
    static [UIConfigKey.sysPos] = { x: 0, y: 0 };
    // talk位置
    static [UIConfigKey.talkPos] = { x: 0, y: 0 };
}